<%--
  Created by IntelliJ IDEA.
  User: 13813
  Date: 2024/7/15
  Time: 10:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
    table.gridtable {
        width: 98%;
        font-family: verdana, arial, sans-serif;
        font-size: 11px;
        color: #333333;
        border-width: 1px;
        border-color: #666666;
        border-collapse: collapse;
    }

    table.gridtable th {
        border-width: 1px;
        padding: 8px;
        border-style: solid;
        border-color: #666666;
        background-color: #dedede;
    }

    table.gridtable td {
        border-width: 1px;
        padding: 8px;
        border-style: solid;
        border-color: #666666;
        background-color: #ffffff;
    }

    a {
        text-decoration: none;
    }
    </style>
</head>
<body>
<form action="cla" method="post">
    班级名称:<input type="text" name="name">
    <hr/>
    班级人数:<input type="text" name="num">
    <hr/>
    <button>提交</button>
</form>
<table class="gridtable">
    <tr>
        <th>班级ID</th>
        <th>班级名称</th>
        <th>班级人数</th>
    </tr>
    <c:forEach var="cla" items="${page.list}">
        <tr>
            <td>${cla.id}</td>
            <td>${cla.name}</td>
            <td>${cla.num}</td>
        </tr>
    </c:forEach>
</table>
<c:if test="${page.pageNum == 1}">
    <a href="#">上一页</a>
</c:if>
<c:if test="${page.pageNum > 1}">
    <a href="cla?pageNum=${page.pageNum - 1}&pageSize=5">上一页</a>
</c:if>
<c:if test="${page.pageNum < page.pages}">
    <a href="cla?pageNum=${page.pageNum + 1}&pageSize=5">下一页</a>
</c:if>
<c:if test="${page.pageNum == page.pages}">
    <a href="#">下一页</a>
</c:if>
<a href="#">当前第${page.pageNum}/${page.pages}页</a>
<a href="#">共${page.total}条</a>
</body>
</html>
